fix: attach browser-level CDP endpoints to a page target#439
fix: attach browser-level CDP endpoints to a page target#439huluma1314 wants to merge 1 commit intojackwener:mainfrom
Conversation
|
Hi! PR #408 covers similar ground: browser-level WebSocket discovery, page target attach, and DevToolsActivePort fallback. It's been through a few rounds of review and might merge soon. Might be worth checking if there's a gap this PR addresses that #408 doesn't. Another concrete risk here: |
Summary
Why
On macOS Chrome exposing DevToolsActivePort, OpenCLI can discover a browser-level websocket like
ws://127.0.0.1:9222/devtools/browser/<id>even when the standard/jsontarget listing is unavailable. Before this change, CDP mode assumed it already had a page-level target, so browser commands andopencli doctorcould fail before any page interaction.Validation
npm test -- src/browser/cdp.test.ts src/browser.test.tsnpm run build